import dayjs from 'dayjs'
// 注册全局过滤器-方式1-简单写法
/*
import Vue from 'vue'
Vue.filter('formatTime', (val) => {
  return dayjs(val).format('YYYY/MM/DD')
})
*/
export function formatTime(val, fomart = 'YYYY/MM/DD') {
  return dayjs(val).format(fomart)
}
export const formatDate = formatTime

import employeesEnum from '@/api/constant/employees.js'
export function formatHireType(val) {
  const f = employeesEnum.hireType.find(t => t.id === parseInt(val))
  return f ? f.value : '未知'
}
